home *** CD-ROM | disk | FTP | other *** search
- /*
- FILE : CFlash.c
- BUILT: 12/19/88
- FONT : Profont fixed-cell 9 point (available on GEnie)
- FROM : GEnie A.COHEN6
- SOURCE: LightSpeed 'c' v3.0
- TARGET: Macintosh II
-
- NOTE : This is the "Hello World" of HyperCard XCMD's
-
- Taken from Appendix A Pg. 223 of the Apple Hypercard Script Language Guide
- (c)Apple Computer, Inc.
- */
-
- #include "HyperXCmd.h"
-
- pascal void
- main(paramPtr) /* Note variation: LSC requires "main" as opposed to "CFlash" */
- XCmdBlockPtr paramPtr;
- {
- short flashCount, again;
- GrafPtr port;
- Str31 str;
-
- ZeroToPas(paramPtr, (char *)(paramPtr->params[0]),(StringPtr) &str);/* get flash count */
- flashCount = StrToNum(paramPtr, &str); /* convert to num */
- if(paramPtr->paramCount !=1) flashCount = 3; /* default if no param */
- if(flashCount < 1) flashCount = 3; /* must be positive */
- GetPort(&port);
- for(again = 1; again <= flashCount; again++) {
- InvertRect(&port->portRect);
- InvertRect(&port->portRect);
- }
- }